package library.common.view.dialog.base;

import android.app.Dialog;
import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;

/**
 * @author Created by qiang.hou on 2018/4/20.
 * @version 1.0
 */
public class CommonParams {
    /**
     * 默认透明度0.2f
     */
    private final static float DEFAULT_DIM_AMOUNT = 0.2f;

    public String TAG = "BaseDialogFragment";
    /**
     * gravity
     */
    public int gravity = Gravity.CENTER;
    /**
     * width
     */
    public int width = WindowManager.LayoutParams.WRAP_CONTENT;
    /**
     * height
     */
    public int height = WindowManager.LayoutParams.WRAP_CONTENT;
    /********* padding *********/
    public int paddingLeft = 0;
    public int paddingRight = 0;
    public int paddingTop = 0;
    public int paddingBottom = 0;

    /**
     * window宽度占屏幕百分比
     */
    public float widthScreenPercent = -1;

    /**
     * 透明度
     */
    public float dimAmount = DEFAULT_DIM_AMOUNT;

    /**
     * dialog title
     */
    public String title = "title";
    /**
     * if has title
     */
    public boolean isHasDialogTitle = true;
    /**
     * if dismiss when click outside
     */
    public boolean isCancelableOutside = true;

    public int layoutId = 0;

    public View mRootView;

    public Dialog mDialog;

    public OnDismissListener dismissListener;

    public interface OnDismissListener {
        public void onDismiss(Object result);
    }
}
